package com.computercourse.manage_course.dao;

import com.computercourse.framework.domain.course.CourseBase;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @description
 * @author Feng.Yuan
 * @date 2020/1/28 11:09 下午
 * @return
 */
@Repository
public interface CourseBaseRepository extends JpaRepository<CourseBase,String> {

    @Query(nativeQuery = true,value = "select * from course_base c where c.id in(:courseIds) ")
    List<CourseBase> findCourseBaseByIdInCourseIds(@Param("courseIds") List<String> courseIds);
}
